package com.xli.mybatis.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.xli.mybatis.interceptor.DecryptInterceptor;
import com.xli.mybatis.interceptor.EncryptInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisConfig {

    @Bean
    ConfigurationCustomizer configurationCustomizer() {
        return (configuration) -> {
            configuration.addInterceptor(new DecryptInterceptor());
            configuration.addInterceptor(new EncryptInterceptor());
        };
    }
}
